#include <QtGui>

#include "mainwindow.h"
#include "taskstab.h"

MainWindow::MainWindow()
{
    tabWidget = new QTabWidget;
    tabWidget->addTab(new TasksTab(),tr("Tasks"));

    createActions();
    createMenus();

    setCentralWidget(tabWidget);
    resize(640, 480);
}

void MainWindow::createActions()
{
    exitAct = new QAction(tr("E&xit"), this);
    exitAct->setShortcuts(QKeySequence::Quit);
    exitAct->setStatusTip(tr("Exit the application"));
    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
}

void MainWindow::createMenus()
{
    fileMenu = menuBar()->addMenu(tr("&File"));
    fileMenu->addAction(exitAct);
}
